@using Seal.Model;
@{
    ReportViewTemplate Template = Model;

    //Template Name
    Template.Name = "Widget";
    Template.Description = "Container having a Widget look: Icon, color, title and links to other views or reports.";

    //If true, the view can be configured for a report model
    Template.ForReportModel = false;

    //Parameters for this template
    Template.Parameters.Add(new Parameter() { Name = "widget_name_as_title", BoolValue = true, DisplayName = "Title: Use view name as title", Description = "If true, the view name is displayed in Widget header as a title." });
    Template.Parameters.Add(new Parameter() { Name = "widget_title", Type = ViewParameterType.Text, DisplayName = "Title", Description = "If 'Use view name as title' is false, the optional title displayed in the Widget header." });
    Template.Parameters.Add(new Parameter() { Name = "widget_exec_view", Type = ViewParameterType.RootReportView, DisplayName = "Title: View of the report to execute from the title", Description = "If a root view is specified, the widget name has a link to execute the report and the view specified." });
    Template.Parameters.Add(new Parameter() { Name = "widget_exec_report", Type = ViewParameterType.Text, DisplayName = "Title: Report to execute from the title", Description = "If a report path is specified, the widget name has a link to execute the report.", Enums = new string[] { "", "\\Overview - Sales.srex", "\\Samples\\04-Charts Gallery - Basics.srex" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "widget_icon", Value = "check", DisplayName = "Icon", Description = "CSS class defining the icon of the widget header. View the full list of Bootstrap 3 Glyphicons at https://getbootstrap.com/docs/3.3/components/", Enums = Parameter.Glyphicons.OrderBy(i => i).ToArray(), UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "widget_color", Value = "default", DisplayName = "Color", Description = "CSS class defining the background color of the widget header.", Enums = new string[] { "", "default", "primary", "success", "info", "warning", "danger" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "widget_css", Value = "page-break-inside:avoid;overflow:auto;margin-top:5px;", DisplayName = "Panel CSS Style", Description = "CSS style attribute of the main panel.", Enums = new string[] { "width:400px;height:300px;page-break-inside:avoid;overflow:auto;", "page-break-inside:avoid;overflow:auto" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "widget_heading_css", Value = "padding-right:2px;", DisplayName = "Panel heading CSS Style", Description = "CSS style attribute of the heading panel." });
    Template.Parameters.Add(new Parameter() { Name = "widget_body_css", Value = "", DisplayName = "Panel body CSS Style", Description = "CSS style attribute of the body panel." });
    Template.Parameters.Add(new Parameter() { Name = "print_break_after_view", DisplayName = "Print: Force a break after the view", BoolValue = false, Description = "If true, a new page is started after the view is displayed for the print layout." });

    //Allowed template parent names
    Template.ParentNames = new List<string>() { "Report", "Model", "Tab Page", "Container", "Container Grid Flex" };
}